<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Repetier-Firmware: Sd2Card Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="repetier-logo-trans128.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Repetier-Firmware
   &#160;<span id="projectnumber">0.91</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('class_sd2_card.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Sd2Card Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="Sd2Card" -->
<p>Raw access to SD and SDHC flash memory cards.  
 <a href="class_sd2_card.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_sd_fat_8h_source.html">SdFat.h</a>&gt;</code></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a1f49fb22b3890260d2b8672010b17f49">Sd2Card</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a5ee7bcd3bda0173fa477efa86eaeab1a">cardSize</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a9d1aea769c0e71a39d5bcd1c5d8ce446">erase</a> (uint32_t firstBlock, uint32_t lastBlock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ae780c9bffb14b9fbf7077d97fb810976">eraseSingleBlockEnable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#aeca83c66edec1c068e687051abe76635">error</a> (uint8_t code)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ad8be6f07f86730f2b2fed4bb34b10f33">errorCode</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a6f85fee8f55dfe119a47647cd4dfbcb9">errorData</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a008934b78ad099ce978883287b320b47">init</a> (uint8_t sckRateID=<a class="el" href="_sd_fat_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a>, uint8_t chipSelectPin=<a class="el" href="_sd_fat_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a2d3c126910c2c0c9d6ac468a459eec39">readBlock</a> (uint32_t block, uint8_t *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ac2a262a5e6c508ec5d5b312f01b54e67">readCID</a> (cid_t *cid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a4a73b4acf0416c0edd9ced858ad37656">readCSD</a> (<a class="el" href="unioncsd__t.html">csd_t</a> *csd)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ace9c999f7d24d3382bb6a32ac1f271d1">readData</a> (uint8_t *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a2d7e430e3cb4a8509b356b94481ea3bd">readStart</a> (uint32_t blockNumber)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a0d8e8db6267dc686d0de12986f432684">readStop</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a990e65b665bf8b131c864c6aba983141">setSckRate</a> (uint8_t sckRateID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a4609e33962a63a3b71f17de25e8745aa">type</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#af3f9516d0822ed675bf92a56c96ebf71">writeBlock</a> (uint32_t blockNumber, const uint8_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a29c4fb0721e5ef10b73dfc2d44ae080a">writeData</a> (const uint8_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#acb9f3776c0a7041e1bf2250a6b8dffbe">writeStart</a> (uint32_t blockNumber, uint32_t eraseCount)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ac4d108c05f53df893d53b7848fc364d8">writeStop</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a4517419ec4bf821be8e34bb1562a906e">cardAcmd</a> (uint8_t cmd, uint32_t arg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a4144ac40b43534083c41a7faf3383415">cardCommand</a> (uint8_t cmd, uint32_t arg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a33b3b771603b9e91c791cd7a39be5fbd">readData</a> (uint8_t *dst, size_t count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#af7820e455ba72ac41b8749ecce475523">readRegister</a> (uint8_t cmd, void *buf)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a4d554e76d6f91a5a0722fca298ee0242">chipSelectHigh</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#aad1f1ef78c225d04b1fffdc4cdd9f360">chipSelectLow</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a731c4dba755005cf052ee8f8822ba5da">type</a> (uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a18cdbb44848cd7e02820694014768441">waitNotBusy</a> (uint16_t timeoutMillis)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a0f54c1169af229bf1ce282e16f1b77da">writeData</a> (uint8_t token, const uint8_t *src)</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#acf49e4d504c34ee0b0aba00296718e94">chipSelectPin_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">errorCode_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a2be136cb8da5736ecdc6c0aed604c902">spiRate_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#a39abba51311659ff2052c48aab2eec79">status_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Raw access to SD and SDHC flash memory cards. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1f49fb22b3890260d2b8672010b17f49"></a><!-- doxytag: member="Sd2Card::Sd2Card" ref="a1f49fb22b3890260d2b8672010b17f49" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_sd2_card.html">Sd2Card</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Construct an instance of <a class="el" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a4517419ec4bf821be8e34bb1562a906e"></a><!-- doxytag: member="Sd2Card::cardAcmd" ref="a4517419ec4bf821be8e34bb1562a906e" args="(uint8_t cmd, uint32_t arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#a4517419ec4bf821be8e34bb1562a906e">cardAcmd</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4144ac40b43534083c41a7faf3383415"></a><!-- doxytag: member="Sd2Card::cardCommand" ref="a4144ac40b43534083c41a7faf3383415" args="(uint8_t cmd, uint32_t arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#a4144ac40b43534083c41a7faf3383415">cardCommand</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a5ee7bcd3bda0173fa477efa86eaeab1a"></a><!-- doxytag: member="Sd2Card::cardSize" ref="a5ee7bcd3bda0173fa477efa86eaeab1a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t <a class="el" href="class_sd2_card.html#a5ee7bcd3bda0173fa477efa86eaeab1a">cardSize</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4d554e76d6f91a5a0722fca298ee0242"></a><!-- doxytag: member="Sd2Card::chipSelectHigh" ref="a4d554e76d6f91a5a0722fca298ee0242" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_sd2_card.html#a4d554e76d6f91a5a0722fca298ee0242">chipSelectHigh</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aad1f1ef78c225d04b1fffdc4cdd9f360"></a><!-- doxytag: member="Sd2Card::chipSelectLow" ref="aad1f1ef78c225d04b1fffdc4cdd9f360" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_sd2_card.html#aad1f1ef78c225d04b1fffdc4cdd9f360">chipSelectLow</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9d1aea769c0e71a39d5bcd1c5d8ce446"></a><!-- doxytag: member="Sd2Card::erase" ref="a9d1aea769c0e71a39d5bcd1c5d8ce446" args="(uint32_t firstBlock, uint32_t lastBlock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a9d1aea769c0e71a39d5bcd1c5d8ce446">erase</a> </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>firstBlock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>lastBlock</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae780c9bffb14b9fbf7077d97fb810976"></a><!-- doxytag: member="Sd2Card::eraseSingleBlockEnable" ref="ae780c9bffb14b9fbf7077d97fb810976" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#ae780c9bffb14b9fbf7077d97fb810976">eraseSingleBlockEnable</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aeca83c66edec1c068e687051abe76635"></a><!-- doxytag: member="Sd2Card::error" ref="aeca83c66edec1c068e687051abe76635" args="(uint8_t code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_sd2_card.html#aeca83c66edec1c068e687051abe76635">error</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set SD error code. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>value for error code. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad8be6f07f86730f2b2fed4bb34b10f33"></a><!-- doxytag: member="Sd2Card::errorCode" ref="ad8be6f07f86730f2b2fed4bb34b10f33" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_sd2_card.html#ad8be6f07f86730f2b2fed4bb34b10f33">errorCode</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>error code for last error. See Sd2Card.h for a list of error codes. </dd></dl>

</div>
</div>
<a class="anchor" id="a6f85fee8f55dfe119a47647cd4dfbcb9"></a><!-- doxytag: member="Sd2Card::errorData" ref="a6f85fee8f55dfe119a47647cd4dfbcb9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_sd2_card.html#a6f85fee8f55dfe119a47647cd4dfbcb9">errorData</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>error data for last error. </dd></dl>

</div>
</div>
<a class="anchor" id="a008934b78ad099ce978883287b320b47"></a><!-- doxytag: member="Sd2Card::init" ref="a008934b78ad099ce978883287b320b47" args="(uint8_t sckRateID=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a008934b78ad099ce978883287b320b47">init</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>sckRateID</em> = <code><a class="el" href="_sd_fat_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>chipSelectPin</em> = <code><a class="el" href="_sd_fat_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initialize an SD flash memory card with default clock rate and chip select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true for success or false for failure. </dd></dl>

</div>
</div>
<a class="anchor" id="a2d3c126910c2c0c9d6ac468a459eec39"></a><!-- doxytag: member="Sd2Card::readBlock" ref="a2d3c126910c2c0c9d6ac468a459eec39" args="(uint32_t block, uint8_t *dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a2d3c126910c2c0c9d6ac468a459eec39">readBlock</a> </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ac2a262a5e6c508ec5d5b312f01b54e67"></a><!-- doxytag: member="Sd2Card::readCID" ref="ac2a262a5e6c508ec5d5b312f01b54e67" args="(cid_t *cid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#ac2a262a5e6c508ec5d5b312f01b54e67">readCID</a> </td>
          <td>(</td>
          <td class="paramtype">cid_t *&#160;</td>
          <td class="paramname"><em>cid</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read a card's <a class="el" href="struct_c_i_d.html">CID</a> register. The <a class="el" href="struct_c_i_d.html">CID</a> contains card identification information such as Manufacturer ID, Product name, Product serial number and Manufacturing date.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">cid</td><td>pointer to area for returned data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true for success or false for failure. </dd></dl>

</div>
</div>
<a class="anchor" id="a4a73b4acf0416c0edd9ced858ad37656"></a><!-- doxytag: member="Sd2Card::readCSD" ref="a4a73b4acf0416c0edd9ced858ad37656" args="(csd_t *csd)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a4a73b4acf0416c0edd9ced858ad37656">readCSD</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="unioncsd__t.html">csd_t</a> *&#160;</td>
          <td class="paramname"><em>csd</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">csd</td><td>pointer to area for returned data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true for success or false for failure. </dd></dl>

</div>
</div>
<a class="anchor" id="ace9c999f7d24d3382bb6a32ac1f271d1"></a><!-- doxytag: member="Sd2Card::readData" ref="ace9c999f7d24d3382bb6a32ac1f271d1" args="(uint8_t *dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#ace9c999f7d24d3382bb6a32ac1f271d1">readData</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dst</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a33b3b771603b9e91c791cd7a39be5fbd"></a><!-- doxytag: member="Sd2Card::readData" ref="a33b3b771603b9e91c791cd7a39be5fbd" args="(uint8_t *dst, size_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#ace9c999f7d24d3382bb6a32ac1f271d1">readData</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af7820e455ba72ac41b8749ecce475523"></a><!-- doxytag: member="Sd2Card::readRegister" ref="af7820e455ba72ac41b8749ecce475523" args="(uint8_t cmd, void *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#af7820e455ba72ac41b8749ecce475523">readRegister</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a2d7e430e3cb4a8509b356b94481ea3bd"></a><!-- doxytag: member="Sd2Card::readStart" ref="a2d7e430e3cb4a8509b356b94481ea3bd" args="(uint32_t blockNumber)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a2d7e430e3cb4a8509b356b94481ea3bd">readStart</a> </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>blockNumber</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a0d8e8db6267dc686d0de12986f432684"></a><!-- doxytag: member="Sd2Card::readStop" ref="a0d8e8db6267dc686d0de12986f432684" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a0d8e8db6267dc686d0de12986f432684">readStop</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a990e65b665bf8b131c864c6aba983141"></a><!-- doxytag: member="Sd2Card::setSckRate" ref="a990e65b665bf8b131c864c6aba983141" args="(uint8_t sckRateID)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a990e65b665bf8b131c864c6aba983141">setSckRate</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>sckRateID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4609e33962a63a3b71f17de25e8745aa"></a><!-- doxytag: member="Sd2Card::type" ref="a4609e33962a63a3b71f17de25e8745aa" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_sd2_card.html#a4609e33962a63a3b71f17de25e8745aa">type</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the card type: SD V1, SD V2 or SDHC </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 - SD V1, 1 - SD V2, or 3 - SDHC. </dd></dl>

</div>
</div>
<a class="anchor" id="a731c4dba755005cf052ee8f8822ba5da"></a><!-- doxytag: member="Sd2Card::type" ref="a731c4dba755005cf052ee8f8822ba5da" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_sd2_card.html#a4609e33962a63a3b71f17de25e8745aa">type</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td><code> [inline, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a18cdbb44848cd7e02820694014768441"></a><!-- doxytag: member="Sd2Card::waitNotBusy" ref="a18cdbb44848cd7e02820694014768441" args="(uint16_t timeoutMillis)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a18cdbb44848cd7e02820694014768441">waitNotBusy</a> </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>timeoutMillis</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af3f9516d0822ed675bf92a56c96ebf71"></a><!-- doxytag: member="Sd2Card::writeBlock" ref="af3f9516d0822ed675bf92a56c96ebf71" args="(uint32_t blockNumber, const uint8_t *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#af3f9516d0822ed675bf92a56c96ebf71">writeBlock</a> </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>blockNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a29c4fb0721e5ef10b73dfc2d44ae080a"></a><!-- doxytag: member="Sd2Card::writeData" ref="a29c4fb0721e5ef10b73dfc2d44ae080a" args="(const uint8_t *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a29c4fb0721e5ef10b73dfc2d44ae080a">writeData</a> </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a0f54c1169af229bf1ce282e16f1b77da"></a><!-- doxytag: member="Sd2Card::writeData" ref="a0f54c1169af229bf1ce282e16f1b77da" args="(uint8_t token, const uint8_t *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#a29c4fb0721e5ef10b73dfc2d44ae080a">writeData</a> </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>token</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="acb9f3776c0a7041e1bf2250a6b8dffbe"></a><!-- doxytag: member="Sd2Card::writeStart" ref="acb9f3776c0a7041e1bf2250a6b8dffbe" args="(uint32_t blockNumber, uint32_t eraseCount)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#acb9f3776c0a7041e1bf2250a6b8dffbe">writeStart</a> </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>blockNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>eraseCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ac4d108c05f53df893d53b7848fc364d8"></a><!-- doxytag: member="Sd2Card::writeStop" ref="ac4d108c05f53df893d53b7848fc364d8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_sd2_card.html#ac4d108c05f53df893d53b7848fc364d8">writeStop</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="acf49e4d504c34ee0b0aba00296718e94"></a><!-- doxytag: member="Sd2Card::chipSelectPin_" ref="acf49e4d504c34ee0b0aba00296718e94" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#acf49e4d504c34ee0b0aba00296718e94">chipSelectPin_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a856093819b4013df8c568dab8c96b79e"></a><!-- doxytag: member="Sd2Card::errorCode_" ref="a856093819b4013df8c568dab8c96b79e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">errorCode_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a2be136cb8da5736ecdc6c0aed604c902"></a><!-- doxytag: member="Sd2Card::spiRate_" ref="a2be136cb8da5736ecdc6c0aed604c902" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#a2be136cb8da5736ecdc6c0aed604c902">spiRate_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a39abba51311659ff2052c48aab2eec79"></a><!-- doxytag: member="Sd2Card::status_" ref="a39abba51311659ff2052c48aab2eec79" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#a39abba51311659ff2052c48aab2eec79">status_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ac52855672d3aac6d0e3b2228ac9e19dc"></a><!-- doxytag: member="Sd2Card::type_" ref="ac52855672d3aac6d0e3b2228ac9e19dc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/ArduinoAVR/Repetier/<a class="el" href="_sd_fat_8h_source.html">SdFat.h</a></li>
</ul>
</div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_sd2_card.html">Sd2Card</a>      </li>

    <li class="footer">Generated on Mon Dec 30 2013 18:53:03 for Repetier-Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
